package rd.system.toeicphoto {
	import flash.external.ExternalInterface;
	
	/**
	 * ...
	 * @author cuong.tran@rdsystem.org
	 */
	public class CategoryData {
		
		private var strNodeid	:String;
		private var strName		:String;
		private var arrQuestion	:Array;
		
		public function CategoryData(xml:XML) {
			
			strNodeid = xml.@nodeid.toString();
			strName = xml.label.toString();
			
			arrQuestion = [];
			var questionData:QuestionData;
			
			for (var i:int = 0; i < xml.question.length(); i ++) {
				questionData = new QuestionData(xml.question[i]);
				arrQuestion.push(questionData);
			}
		}		
		
		public function get nodeid():String {
			return strNodeid;
		}
		
		public function get name():String {
			return strName;
		}
		
		public function get questions():Array {
			return arrQuestion;
		}		
	}
}